import { ref } from 'vue'
import {defineStore} from 'pinia'
import {getCategoryAPI} from "@/api/Layout/getCategoryAPI";

export const useCategoryStore = defineStore('category',()=>{
    const categoryList = ref([])
    const category = async ()=>{
        const {data} = await getCategoryAPI()
        categoryList.value = data.result
    }
    return {
        categoryList,
        category
    }
}
)